/* 下载对话框样式 */
.download-dialog {
  z-index: 9999 !important;
}

.download-dialog .ant-modal-mask {
  background-color: rgba(0, 0, 0, 0.45) !important;
  z-index: 9998 !important;
}

.download-dialog .ant-modal-wrap {
  z-index: 9999 !important;
}

.download-dialog .ant-modal-content {
  background: #ffffff !important;
  border: 2px solid #1890ff !important;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.download-dialog .ant-modal-header {
  background: #ffffff;
  border-bottom: 1px solid #f0f0f0;
  border-radius: 8px 8px 0 0;
}

.download-dialog .ant-modal-title {
  color: rgba(0, 0, 0, 0.88);
  font-size: 16px;
  font-weight: 500;
}

.download-dialog .ant-modal-close {
  color: rgba(0, 0, 0, 0.45);
}

.download-dialog .ant-modal-close:hover {
  color: rgba(0, 0, 0, 0.75);
}

.download-dialog .ant-modal-footer {
  background: #ffffff;
  border-top: 1px solid #f0f0f0;
  border-radius: 0 0 8px 8px;
}

/* 按钮样式 */
.download-dialog .ant-btn {
  border-radius: 6px;
  font-weight: 400;
}

.download-dialog .ant-btn-default {
  background: #ffffff !important;
  border-color: #d9d9d9 !important;
  color: rgba(0, 0, 0, 0.88) !important;
}

.download-dialog .ant-btn-default:hover {
  background: #f5f5f5 !important;
  border-color: #4096ff !important;
  color: #4096ff !important;
}

.download-dialog .ant-btn-primary {
  background: #1890ff !important;
  border-color: #1890ff !important;
  color: #ffffff !important;
}

.download-dialog .ant-btn-primary:hover {
  background: #40a9ff !important;
  border-color: #40a9ff !important;
}

/* 对话框内容 */
.download-dialog-content {
  padding: 8px 0;
}

/* 文件信息卡片 */
.download-dialog .download-file-info-card {
  background: #fafafa;
  border: 1px solid #d9d9d9;
  border-left: 3px solid #1890ff;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 24px;
}

.download-dialog .download-file-info-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.download-dialog .download-file-icon {
  font-size: 20px;
  color: #1890ff;
  margin-top: 2px;
  flex-shrink: 0;
}

.download-dialog .download-file-details {
  flex: 1;
  min-width: 0;
}

.download-dialog .download-file-name {
  font-size: 14px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.88);
  margin-bottom: 6px;
  word-break: break-all;
}

.download-dialog .download-file-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.download-dialog .download-file-meta .ant-typography {
  color: rgba(0, 0, 0, 0.65) !important;
  font-size: 12px !important;
}

.download-dialog .download-file-path {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 11px;
  word-break: break-all;
  color: rgba(0, 0, 0, 0.65) !important;
}

/* 保存配置区域 */
.save-config {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.config-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.config-label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.88);
  margin-bottom: 4px;
}

/* 路径输入组 */
.path-input-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.path-input {
  flex: 1;
}

.path-input .ant-input {
  background: #ffffff;
  border: 1px solid #d9d9d9;
  color: rgba(0, 0, 0, 0.88);
}

.path-input .ant-input:hover {
  border-color: #4096ff;
}

.path-input .ant-input:focus {
  border-color: #4096ff;
  box-shadow: 0 0 0 2px rgba(5, 145, 255, 0.1);
}

.browse-button {
  background: #ffffff !important;
  border: 1px solid #d9d9d9 !important;
  color: rgba(0, 0, 0, 0.88) !important;
  flex-shrink: 0;
}

.browse-button:hover {
  background: #f5f5f5 !important;
  border-color: #4096ff !important;
  color: #4096ff !important;
}

.browse-button:focus {
  background: #ffffff !important;
  border-color: #4096ff !important;
  color: #4096ff !important;
  box-shadow: 0 0 0 2px rgba(5, 145, 255, 0.1) !important;
}

/* 文件名输入 */
.filename-input .ant-input {
  background: #ffffff;
  border: 1px solid #d9d9d9;
  color: rgba(0, 0, 0, 0.88);
}

.filename-input .ant-input:hover {
  border-color: #4096ff;
}

.filename-input .ant-input:focus {
  border-color: #4096ff;
  box-shadow: 0 0 0 2px rgba(5, 145, 255, 0.1);
}

/* 路径预览 */
.path-preview {
  background: #f5f5f5;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  padding: 12px;
  margin-top: 8px;
}

.preview-label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.65);
}

.preview-path {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 12px;
  word-break: break-all;
  background: #ffffff !important;
  color: rgba(0, 0, 0, 0.88) !important;
  border: 1px solid #d9d9d9 !important;
  padding: 6px 8px !important;
  border-radius: 4px !important;
}

/* 下载选项 */
.download-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.download-options .ant-checkbox-wrapper {
  color: rgba(0, 0, 0, 0.88);
  font-size: 13px;
}

.download-options .ant-checkbox-wrapper:hover .ant-checkbox-inner {
  border-color: #4096ff;
}

.download-options .ant-checkbox-checked .ant-checkbox-inner {
  background-color: #1890ff;
  border-color: #1890ff;
}

.download-options .ant-checkbox-inner {
  background-color: #ffffff;
  border-color: #d9d9d9;
}

.download-options .ant-checkbox-inner:hover {
  border-color: #4096ff;
}



/* 批量下载样式 */
.batch-file-info {
  width: 100%;
}

.batch-header {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
}

.batch-details {
  flex: 1;
  margin-left: 12px;
}

.batch-title {
  font-size: 16px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.88);
  margin-bottom: 4px;
}

.batch-meta {
  color: rgba(0, 0, 0, 0.65);
}

.batch-file-list {
  max-height: 120px;
  overflow-y: auto;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  padding: 8px;
  background: #fafafa;
}

.batch-file-list::-webkit-scrollbar {
  width: 6px;
}

.batch-file-list::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 3px;
}

.batch-file-list::-webkit-scrollbar-thumb {
  background: #d9d9d9;
  border-radius: 3px;
}

.batch-file-list::-webkit-scrollbar-thumb:hover {
  background: #bfbfbf;
}

.batch-file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid #f0f0f0;
}

.batch-file-item:last-child {
  border-bottom: none;
}

.batch-file-item .ant-typography {
  color: rgba(0, 0, 0, 0.88) !important;
}

.batch-file-item .ant-typography[style*="font-size: 12px"] {
  color: rgba(0, 0, 0, 0.65) !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .download-dialog {
    width: 90vw !important;
    margin: 20px;
  }

  .path-input-group {
    flex-direction: column;
    align-items: stretch;
  }

  .browse-button {
    width: 100%;
  }

  .batch-file-list {
    max-height: 80px;
  }
}
